﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _04_TriangleSurfaceMethods
{
    class Program
    {
        static double TriangleSurface(double side, double height)
        {
            return ((side * height) / 2);
        }
        static double TriangleSurface(double firstSide, double secondSide, double thirdSide)
        {
            double halfPerimeter = ((firstSide + secondSide + thirdSide) / 2);
            return Math.Sqrt(halfPerimeter * (halfPerimeter - firstSide) *
                (halfPerimeter - secondSide) * (halfPerimeter - thirdSide));
        }
        static double TriangleSurface(double firstSide, double secondSide, int angle)
        {
            double pi = Math.PI;
            double sin = Math.Sin((angle * pi) / 180);
            return ((firstSide * secondSide * sin) / 2);
        }

        static void Main(string[] args)
        {
            int firstSide = int.Parse(Console.ReadLine());
            int secondSide = int.Parse(Console.ReadLine());
            int thirdSide = int.Parse(Console.ReadLine());
            int height = int.Parse(Console.ReadLine());
            int degree = int.Parse(Console.ReadLine());

            Console.WriteLine(TriangleSurface(firstSide, secondSide, thirdSide));
            Console.WriteLine(TriangleSurface(firstSide, height));
            Console.WriteLine(TriangleSurface(firstSide, secondSide, degree));

        }
    }
}
